﻿using AutoMapper;
using Blog.Application.Contract.User.Dto;
using Blog.Module;


namespace Blog.Application.AutoMapper;

public class UserAutoMapperProfile : Profile
{
    public UserAutoMapperProfile()
    {
        // Users 实体转换
        CreateMap<CreateUserDto, Users>();
        CreateMap<Users, UserDto>()
            .ForMember(x => x.Role, x => x.MapFrom(o => o.Role.ToString()));

    }

}
